package cn.lyd.base.until;

import cn.lyd.base.jwt.UserInfo;

public class ThreadLocalUtil {
    private static ThreadLocal<UserInfo> threadLocal = new ThreadLocal() ;

    public static void setUserInfo(UserInfo userInfo) {
        threadLocal.set(userInfo);
    }
    public static UserInfo getUserInfo() {
        UserInfo userInfo = threadLocal.get();
        return  userInfo;
    }
    public static void remove() {
        threadLocal.remove();
    }
}